package com.jy.api.healthreord.dto.jiuzhen;

import java.util.Date;

import com.alibaba.fastjson.annotation.JSONField;
import com.alibaba.fastjson.serializer.ToStringSerializer;
import com.fasterxml.jackson.annotation.JsonFormat;

import io.swagger.annotations.ApiModelProperty;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;

@Getter
@Setter
@NoArgsConstructor
public class JiuZhenDto {
    @JSONField(
            serializeUsing = ToStringSerializer.class
    )
    private Long id;
    @JsonFormat(
            pattern = "yyyy-MM-dd HH:mm:ss"
    )
    private Date chuangJianSJ;
    @JsonFormat(
            pattern = "yyyy-MM-dd HH:mm:ss"
    )
    private Date xiuGaiSJ;
    private String zuoFeiBZ;

    @ApiModelProperty(value = "医院id", required = true)
    private String hospitalId;

    @ApiModelProperty(value = "病人id", required = true)
    @JSONField(serializeUsing = ToStringSerializer.class)
    private Long bingRenId;

    @ApiModelProperty(value = "患者就诊唯一id", required = true)
    private String jiuZhenId;

    @ApiModelProperty(value = "转诊前就诊唯一id")
    private String zhuanZhenQJZId;

    @ApiModelProperty(value = "就诊登记时间", required = true)
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date jiuZhenSJ;

    @ApiModelProperty(value = "就诊类型（1-普通门诊，2-急诊，3-体检，4-住院", required = true)
    private String jiuZhenLX;

    @ApiModelProperty(value = "his挂号id", required = true)
    private String hisGuaHId;

    @ApiModelProperty(value = "院内科室编码", required = true)
    private String keShiDM;

    @ApiModelProperty(value = "科室名称", required = true)
    private String keShiMC;

    @ApiModelProperty(value = "医生代码", required = true)
    private String yiShengDM;

    @ApiModelProperty(value = "医生姓名", required = true)
    private String yiShengXM;

    @ApiModelProperty(value = "医生电话", required = true)
    private String yiShengDH;

    @ApiModelProperty(value = "国标科室编码", required = true)
    private String guoBiaoKSDM;

    @ApiModelProperty(value = "就诊医生身份证", required = true)
    private String yiShengZJHM;

    @ApiModelProperty(value = "病区号", required = true)
    private String bingQuHao;

    @ApiModelProperty(value = "住院床号（就诊类型为住院时填写）", required = true)
    private String zhuYuanCH;

    @ApiModelProperty(value = "住院号（就诊类型为住院时必填）", required = true)
    private String zhuYuanHao;

    @ApiModelProperty(value = "是否预约（0：否；1：是）", required = true)
    private String shiFouYY;

    @ApiModelProperty(value = "是否转诊（0：否；1：是）", required = true)
    private String shiFouZZ;

    @ApiModelProperty(value = "是否首诊（0：否；1：是）", required = true)
    private String shiFouSZ;

    @ApiModelProperty(value = "是否急诊", required = true)
    private String shiFouJZ;

    @ApiModelProperty(value = "是否专家号", required = true)
    private String shiFouZJ;

    @ApiModelProperty(value = "是否是发热门诊 (0：否；1：是)", required = true)
    private String shiFouFRMZ;

    private String shiFouQY;

    private String quYaoMa;

    @ApiModelProperty(value = "人群类型 (0：儿童；1：孕妇 2:老年人 3: 普通人 )", required = true)
    private String renQunLB;

    @ApiModelProperty(value = "入科时间")
    private String ruKeSJ;

    private String bingRenXM;

    private String zhengJianHM;

    /**
     * 区域就诊唯一id
     */
    private String quYuJZWYId;

    private String shouJiHao;

    private String yiHouFu;

    private String jiuZhenKa;

    /**
     * 就诊类型为门诊时：状态 1：已接诊；2：已开单；3：已支付
     * 就诊类型为住院时：状态 1：已住院；2：已出院；
     */
    private String zhuangTai;

    @ApiModelProperty(value = "病案号")
    private String bingAnHao;

    @ApiModelProperty(value = "病区代码")
    private String bingQuDM;

    @ApiModelProperty(value = "病区名称")
    private String bingQuMC;
    @ApiModelProperty("收费类型")
    private String shouFeiLX;
    @ApiModelProperty("诊断代码")
    private String zhenDuanDM;
    @ApiModelProperty("诊断名称")
    private String zhenDuanMC;
    @ApiModelProperty("互联网问诊类型(0-图文问诊,1-视频问诊,3-复诊配药)")
    private Integer ziXunWZLX;
    @ApiModelProperty("互联网问诊id")
    private Long huLianWWZId;
    @ApiModelProperty("在院状态")
    private Integer zaiYuanZT;

    @ApiModelProperty("出院时间")
    private Date chuYuanSJ;

//    @ApiModelProperty("卡类型")
//    private Integer kaLX;
//    @ApiModelProperty("证件类型")
//    private Integer zhengJianLX;
//    @ApiModelProperty("孕期")
//    private Integer yunQi;
//    @ApiModelProperty("是否哺乳")
//    private Integer shiFouPR;

    public JiuZhenDto(String hospitalId, String guoBiaoKSDM, String yiShengDM) {
        this.hospitalId = hospitalId;
        this.guoBiaoKSDM = guoBiaoKSDM;
        this.yiShengDM = yiShengDM;
    }

    public String getUniqueYiShengDM() {
        return hospitalId + ":" + guoBiaoKSDM + ":" + yiShengDM;
    }
}
